<LINK title=win2k-1 media=all href="file/calendar-win2k-1.css" type=text/css rel=stylesheet>
<SCRIPT src="file/calendar.js" type=text/javascript></SCRIPT>  
<SCRIPT src="file/calendar-setup.js" type=text/javascript></SCRIPT>
<SCRIPT src="file/calendar-en.js" type=text/javascript></SCRIPT>

<?
	$id = 0;
	$table = "banner";
	$mod = $_GET['mod'];	
	$title_add = '"Banner"';
	
	$listid = $_GET['listid'];
	$key_str =  substr($listid,0,strlen($listid)-1);
	$key_arr = explode(',', $key_str);
	$num_edit = count($key_arr);
	
	$db = new MySQL();	
?>
<script type="text/JavaScript">
	function checkinput()
	{
		
		return true;
	}
	
	function save(id)
	{
		var frm=document.frmedit;		
		if(checkinput())
		{
			if(id==0)  frm.action="?mod=<?=$mod?>&act=process";
			else frm.action="?mod=<?=$mod?>&act=process&id="+id;
			frm.method="POST";
			frm.submit();
		}
	}
	
	function resetfrom()
	{
	   document.frmedit.reset();
	   
	}
	
	
	
	
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
	  <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="34"><img src="<?=APPLICATION_SITEADMIN_URL?>images/cor_data_top_l.gif" alt="tl" width="34" height="19" /></td>
			<td class="toptborder">&nbsp;</td>
			<td width="20"><img src="<?=APPLICATION_SITEADMIN_URL?>images/cor_data_top_r.gif" alt="tr" /></td>
		  </tr>
	  </table></td>
	</tr>
	<tr>
	  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="10" class="leftborder">&nbsp;</td>
			<td><table width="100%" border="0" cellpadding="0" cellspacing="2" class="dataBack">
			  <tr>
				<td width="55%" height="36" class="titleOrange"><?=$title_add?></td>
				<td align="right" valign="middle" class="titleOrange">&nbsp;</td>
			  </tr>
			  
			  <tr>
				<td height="7" colspan="2" background="images/cor_data_line1.gif"></td>
			  </tr>
			  <tr>
				<form name="frmedit" method="post" enctype="multipart/form-data" onSubmit="return checkinput();">
				<td  colspan="2"><table width="100%" border="0" cellspacing="0">	
				  <?
					$sql = $db->select("select * from $table where id in ('".str_replace(",","','",$key_str)."')");
					$i=0;
					while( $te = $db->fetch($sql) )
					{
						$i++;
				  ?>
				  <tr>
					<td width="19%" align="right" valign="top">Image (1600px*400px) : </td>
					<td ><input type="file" name="image_<?=$i?>" />
					 <?php
						if($te['image']!="" && file_exists("../banner-img/".$te['image']))
						{
							echo '<br/><img src="'.APPLICATION_URL.'banner-img/'.$te['image'].'" width="500px"  />';
						}
					?>
					</td>
				  </tr>	
				  <tr>
				  	<td colspan="2">&nbsp;</td>
				  </tr>					  	
				  <?php
				  }
				  ?>		  
				  <tr>
					<td height="35" align="right" valign="top">&nbsp;</td>
					<td align="left" valign="middle"><img src="images/icons/save.png" onClick="save(<?=$id?>);" class="pointer" />
					  <input name="" type="reset" class="frmbnt" value="Reset" onClick="resetfrom()" style="display:none" /></td>
				  </tr>
				</table>
				<input type="hidden" name="form_" value="editlist"><input type="hidden" name="listid" value="<?=$listid?>" />
				</td>
				</form>
			 </tr>
		   </table>
		   </td>
		   <td width="10" class="rightborder">&nbsp;</td>
		 </tr>
	  </table></td>
	</tr>
	<tr>
	  <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dataBack">
		  <tr>
			<td width="34"><img src="<?=APPLICATION_SITEADMIN_URL?>images/cor_data_bot_l.gif" alt="bl" /></td>
			<td class="botborder" >&nbsp;</td>
			<td width="19"><img src="<?=APPLICATION_SITEADMIN_URL?>images/cor_data_bot_r.gif" alt="br" /></td>
		  </tr>
	  </table></td>
	</tr>
</table>